-- GENERATED SPELL FOR [Vekh'nir Dreadhawk] --


function spell0_19984(pUnit, Event) --@Angry Arakkoa Ghost,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(36888,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_19984', 1, 1)
end

function spell1_19984(pUnit, Event) --@Heal,Heal--
pUnit:FullCastSpellOnTarget(11642,pUnit)
pUnit:RegisterEvent('Sorts_19984', 3500, 1)
end

function spell2_19984(pUnit, Event) --@Throw Rock,n/a--
pUnit:FullCastSpellOnTarget(36651,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19984', 652, 1)
end

function spell3_19984(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(37583,pUnit)
pUnit:RegisterEvent('Sorts_19984', 577, 1)
end

function spell4_19984(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(37582,pUnit)
pUnit:RegisterEvent('Sorts_19984', 2000, 1)
end

function Sorts_19984(pUnit, Event)
local choix_sorts_19984 = math.random(0, 4)
if choix_sorts_19984 == 0 then
pUnit:RegisterEvent('spell0_19984', 1, 1)
end
if choix_sorts_19984 == 1 then
pUnit:RegisterEvent('spell1_19984', 1, 1)
end
if choix_sorts_19984 == 2 then
pUnit:RegisterEvent('spell2_19984', 1, 1)
end
if choix_sorts_19984 == 3 then
pUnit:RegisterEvent('spell3_19984', 1, 1)
end
if choix_sorts_19984 == 4 then
pUnit:RegisterEvent('spell4_19984', 1, 1)
end
end

function mob19984_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19984', math.random(1500, 3000), 1)
end

function mob19984_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19984_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19984_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19984, 1, 'mob19984_Action')
RegisterUnitEvent(19984, 2, 'mob19984_Leave')
RegisterUnitEvent(19984, 3, 'mob19984_Kill')
RegisterUnitEvent(19984, 4, 'mob19984_Die')
